projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ce7947
)
Raise an exception in xm_block_detach if using Xen-API and it fails -- this
author
Ewan Mellor
<ewan@xensource.com>
Tue, 20 Mar 2007 17:36:18 +0000
(17:36 +0000)
committer
Ewan Mellor
<ewan@xensource.com>
Tue, 20 Mar 2007 17:36:18 +0000
(17:36 +0000)
ensures that the exit status properly set.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
tools/python/xen/xm/main.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xm/main.py
b/tools/python/xen/xm/main.py
index a138afdd9592f1fc0fcb8510eeef7210f772694b..66a5951f7f5024e03ec224c60c6ab511f1609d40 100644
(file)
--- a/
tools/python/xen/xm/main.py
+++ b/
tools/python/xen/xm/main.py
@@
-1962,7
+1962,8
@@
def xm_block_detach(args):
if len(server.xenapi.VDI.get_VBDs(vdi_ref)) <= 0:
server.xenapi.VDI.destroy(vdi_ref)
else:
- print "Cannot find device '%s' in domain '%s'" % (dev,dom)
+ raise OptionError("Cannot find device '%s' in domain '%s'"
+ % (dev,dom))
else:
try:
detach(args, 'block-detach', 'vbd')